package com.qf.comment.utils;

/**
 * User: key
 * ClassName:ScoreUtils
 * Date: 2023/6/10
 * Time: 9:42
 * description:
 */
public class ScoreUtils {

    /*
    * 这里我们分配一个权重
    * 帖子是否加精的权重为92
    * 帖子点赞数量的权重为3
    * 帖子的评论数量的权重为4
    * 帖子发布者的账号等级权重为1
    * */

    public Double ScoreCompute(Integer status,Long likeCount,Long commentCount,Integer userIdLevel){
        if (status == 1){
            status = status * 92;
        }
        likeCount = likeCount * 3;
        commentCount = commentCount * 4;
        Double score = (double)((status + likeCount + commentCount)/100);
        return score;
    }
}
